<!DOCTYPE html>
<html>
<head>
    <title>商户列表</title>
    <#include "/header.html">
    <link type="text/css" rel="stylesheet" href="${request.contextPath}/statics/plugins/layui/css/layui.css">
    <style>
        th {
            text-align: center;
        }

        .form-control {
            margin-left: 5px;
        }
    </style>

</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <form class="form-inline">
                <div class="form-group ">
                    <input type="text"  class="col-md-1 form-control" id="reportDate"
                           placeholder="请选择导入日期" readonly>
                    <select v-model="q.terminalType" class="form-control">
                        <option v-for="ter in this.terminalTypes" :value="ter.terminalType">{{ter.terminalName}}</option>
                    </select>
                    <input type="text"  class="form-control" v-model="q.sn"
                           placeholder="请输入SN" >
                    <input type="text"  class="form-control" v-model="q.merchantName"
                           placeholder="请输入商户名称" >
                    <input type="text"  class="form-control" v-model="q.merchantCode"
                           placeholder="请输入商户号" >
                    <input type="text"  class="form-control" v-model="q.name"
                           placeholder="请输入报备人姓名" >
                    <input type="button" class="btn btn-default form-control" @click="query"  value="查询"/>
                    <input type="button" class="btn btn-default form-control" @click="clean" value="刷新"/>
                    <input type="button" class="btn btn-default form-control" @click="toUpdate" value="修改"/>
                    <input type="button" class="btn btn-default form-control" @click="deleteMer" value="删除"/>
                </div>
            </form>

        </div>
        <table id="jqGrid"></table>

        <div id="jqGridPager"></div>
    </div>

    <div v-show="showUpdate" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
            <input type="hidden" name="reportId" v-model="merchant.reportId">
            <div class="form-group">
                <div class="col-sm-2 control-label">商户姓名</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="merchantName" v-model="merchant.merchantName"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">联系方式</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="phone" v-model="merchant.phone"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">SN</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="sn" v-model="merchant.sn" />
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary " @click="updateMer" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>

</div>


<script src="${request.contextPath}/statics/js/modules/merchant/merchantList.js?_${.now?long}"></script>
<script src="${request.contextPath}/statics/plugins/layui/layui.js"></script>
<script>
    layui.use('laydate', function () {
        var laydate = layui.laydate;

        //常规用法
        laydate.render({
            elem: '#reportDate',
            format: 'yyyy-MM-dd',
            done: function (value, date) {
                vm.q.reportDate=value;
                $("#reportDate").val(value);


            }
        });
    });

</script>
</body>
</html>